1. Field of the Invention
The present invention relates generally to the field of computing systems and more specifically, to the industry standard Small Computer System Interface (SCSI).
2. Related Art
The small computer systems interface (SCSI) is an American National Standard Institute (ANSI) standard communications bus that includes an electrical and logical protocol specification. The SCSI standard provides for the connection of up to a specific number of devices on a bus, each having a unique identification (ID). The devices can be of any type, ranging from host computers to disk drives, tape drives, optical storage devices, printers, scanners, etc.
SCSI has become an industry standard. It is used, for example, in the computer workstation as well as the personal computer environment. It has also become the standard for peripherals, such as disk drives, tape drives, optical storage devices, printers, scanners, etc. Like all standards, SCSI is used in a large number of installed pieces of computer equipment. Users have invested considerable money in computers and peripherals which employ the SCSI standard.
There are different types of SCSI bus interfaces. There are 8 data bit SCSI bus interfaces, such as the SCSI-1 interface and the SCSI-2 Narrow and Fast interface. Both of these SCSI interfaces consists of 8 data bits, a parity bit, and corresponding control signals. However, the SCSI-2 Narrow and Fast interface transfers data at twice the speed of SCSI-1. Another type of SCSI interface is a 16 data bit SCSI interface, referred to as the SCSI-2 Wide interface. The SCSI-2 Wide interface consists of 16 data bits, two parity bits, and corresponding control signals. In addition, a SCSI Wide interface also provides a Fast option, referred to as a SCSI-2 Wide and Fast interface, capable of transferring data at four times the speed of SCSI-1.
Each device on the SCSI bus is assigned a bus address or identification (ID). The value of the address corresponds to one data bit line on the SCSI bus. Thus, on a SCSI-1 or SCSI-2 Narrow bus, a maximum of 8 devices can be connected. On a SCSI-2 Wide bus, a maximum of 16 devices can be connected in a similar fashion.
FIG. 1 shows a block diagram of a conventional SCSI-1 bus system. Referring now to FIG. 1, SCSI-1 bus system 100 includes a host computer device 102 electrically connected to a SCSI bus 104. Host computer 102 has been assigned SCSI ID No. 7. Connected to SCSI bus 104 are seven additional devices 106, 108, 110, 112, 114, 116, and 118. These additional devices 106-118, referred to as peripheral devices, can be any device that complies with the protocol of the implemented SCSI standard. Additional peripheral device 106 has been assigned, for example, SCSI ID No. 0. Similarly, drive 108 has been assigned SCSI ID No. 1, drive 110 has been assigned SCSI ID No. 2, robotics 112 has been assigned SCSI ID No. 3, drive 114 has been assigned SCSI ID No. 4, drive 116 has been assigned SCSI ID No. 5, and robotics 118 has been assigned SCSI ID No. 6.
As an aside, it should be noted that drive 108, drive 110, and robotics 112 are shown as residing in an optical library enclosure 120. This is merely for purposes of illustration to show that more than one device connected to a SCSI bus can reside in a single physical enclosure. This inclusion of more than one SCSI device in a single physical (mechanical) enclosure is a trend, for example, in connection with the storage of large amounts of data.
The communication between SCSI host device 102 and a SCSI peripheral device 106-118 is conducted according to a predetermined format of signal transmissions dictated by the implemented SCSI protocol. The communication may consist of SCSI host 102 assuming the role of an initiator and sending a command to target peripheral device or devices 106-118. The target SCSI peripheral devices will perform a function according to the command sent by the host. The target SCSI device then returns results or status to host computer device 102.
The communication conducted between host device 102 and a target peripheral device 106-108 is controlled by the SCSI peripheral device through the issuance of control signals. Each binary value of the collection of these control signals is called a phase. FIG. 2 illustrates the SCSI bus phases of conventional SCSI bus system 100 which operate according to one of the above SCSI standards and which are relevant to the present invention. As is well known to one skilled in the relevant art, the SCSI logical architecture includes eight distinct phases. They are bus free phase 202, arbitration phase 204, selection and reselection phases 206, and information transfer phases 208. The information transfer phases 208 include a command phase, a data phase, a status phase, and a message phase.
Certain of the eight phases are shown together, such as selection and reselection phases 206. This is because either the selection phase or reselection phase, but not both simultaneously, will occur after bus free phase 202. Which phase occurs depends upon whether the host device 102 or a peripheral device 106-118 is to transmit over the bus. The type of communication (phase) is controlled by the SCSI peripheral devices. A SCSI peripheral device indicates its intention to host 102 through a combination of control signals. Thus, SCSI host device 102 cannot force a SCSI peripheral device 106-118 to transition to a given phase.
Communication on the SCSI bus is accomplished by any device (host or peripheral) initiating an arbitration phase 204. Arbitration phase 204 allows one SCSI device to gain control of SCSI bus 104 so that it can initiate or resume an input/output (hereinafter, "I/O") process. The established procedure for a SCSI device to obtain control of SCSI bus 104 consists of all devices first recognizing that the SCSI bus is available. That is, all devices recognize that SCSI bus 104 is in bus free phase 202. Then, after waiting a minimum bus settle delay of 400 nanoseconds (ns) after the occurrence of bus free phase 202, the SCSI devices assert their SCSI ID. Each SCSI bus ID is associated with a unique data bit assigned to the SCSI device. When a SCSI device asserts its ID, it drives the data bit line corresponding to its assigned address. After an additional period of time of 2400 ns, all devices examine the asserted data bits. The device with the highest SCSI ID value wins the arbitration. That device then initiates the selection (host to peripheral) or reselection (peripheral to host) phase 206. After a successful selection or reselection phase 206, the actual information is exchanged between the devices in information transfer phases 208.
The process performed in arbitration phase 204 favors the SCSI device having the highest SCSI bus address (ID) on SCSI bus 104. Configuration guidelines for SCSI bus systems operating in accordance with the above SCSI standards recommend that host computer 102 be assigned the highest address ID (ID=7 on an 8 bit wide SCSI bus (FIG. 1) or ID=15 on a 16 bit wide SCSI bus). When host device 102 is to send a command to an idle peripheral device, it will initiate arbitration phase 204. By virtue of its SCSI bus address, host device 102 is given the highest priority on SCSI bus 104. Thus, resolution during arbitration phase 204 will result in host device 102 winning arbitration over peripheral devices at lower addresses (IDs) that may need to connect to host computer 102. Host computer 102 will then enter selection phase 206 followed by information transfer phases 208.
In addition to host device 102 winning arbitration over peripheral devices, a similar phenomenon occurs among peripheral devices 106-118. In systems having multiple peripheral devices attached to SCSI bus 104, a peripheral device having a higher address will always win arbitration over the peripheral device having a lower address. For example, drive 116, having an address of 5, will always win arbitration over drive 108 having an address of 1.
In a high performance computer system such as that illustrated in FIG. 1, host device 102 typically has several I/O tasks ready to be issued to some or all of the peripheral devices connected to SCSI bus 104. The I/O tasks are generally waiting in a queue. When SCSI bus 104 enters bus free phase 202, host device 102 will initiate arbitration phase 204 and win arbitration. It will then select (phase 206) and issue (phase 208) an I/O to one of the peripheral devices. After a disconnection at the end of information transfer phases 208, SCSI bus 104 again enters bus free phase 202. When bus free phase 202 occurs, all SCSI devices will arbitrate again in arbitration phase 204 and host device 102 will win arbitration again to issue another I/O task. This sequence of events will be continually repeated until host device 102 has issued all queued I/O tasks.
When a peripheral device is ready to exchange data, it will have to wait until it wins arbitration during arbitration phase 204. Since all the peripheral devices have I/O tasks, they are working concurrently until they are ready to exchange data with host 102. When SCSI bus 104 goes free in bus free phase 202, the peripheral device with the highest address (robotics 108 with SCSI ID=6) will win the arbitration, provided host 102 (at a higher address of 7) does not have an I/O command to send. After the I/O task is completely finished, the next lower priority peripheral device (drive 116 with SCSI ID=5) will win arbitration and will then exchange data with host 102. The process will continue until such time when host computer system 102 has a new I/O task for one of the peripheral devices. At this time, host device 102 will win arbitration over a peripheral device with a lower address that is attempting to complete a previously issued I/O task.
With advances in technology, host computer systems and peripheral devices can issue and complete I/O tasks at a very rapid rate. The data exchange consumes a finite amount of time on SCSI bus 104 and depends on the length of the data transfer. If, for example, the I/O task is completed by robotics peripheral device 118 at SCSI address 6, host computer system 102 can then issue another I/O task to this device. If such was the case, the new I/O task will be issued and the device at address 6 will quickly become ready to exchange data again. If the SCSI peripheral devices having lower addresses have not completed their I/Os from a previous request, they will be preempted by the new I/O task from the device at address 6. If the cycles were allowed to continue, devices at lower addresses will be unable to finish their I/O tasks, even though the bus is operating at full capacity.
The standard SCSI arbitration mechanism also causes an uneven distribution of I/Os serviced by the peripheral devices connected on a SCSI bus. For example, devices 116 (ID=5), 114 (ID=4), 110 (ID=2), and 108 (ID=1) are like-type devices connected to SCSI bus 104. The devices at higher addresses, such as drives 116 and 118, will service a far greater number of I/O tasks than the devices at lower addresses, such as devices 110 and 108. This phenomenon falsely conveys that the devices at lower addresses are malfunctioning or have much slower access time than similar devices at the higher addresses.
In addition, if I/O tasks are not serviced within an associated period of time they time-out, causing a system error. This may occur in SCSI devices having lower SCSI IDs operating in a SCSI bus system wherein the SCSI bus is heavily utilized, resulting in little or no idle time on the SCSI bus. Under such conditions, the devices having a lower address are not granted the opportunity to use the SCSI bus due to repeatedly losing arbitration. The potential for this occurring increases as SCSI bus utilization increases.
What is needed, therefore, is the ability to allow a uniform distribution of I/O tasks with all devices getting equal access on the SCSI bus and without decreasing the utilization of the bus. Furthermore, it is desired that such a mechanism prevents the I/O tasks from timing out to any of the devices (most likely those with a lower address) when the connectivity of the bus is fully utilized and the bus is operating near saturation.